<template>
  <el-dialog
    title="签章选择"
    :visible.sync="dialogVisible"
    :append-to-body="true"
  >
    <div>签章表格todo</div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="onConfirm">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    multi: {
      type: Boolean,
      default: false,
    },
    // 已选中的id列表
    selectedIds: {
      type: Array,
      default: function () {
        return [];
      },
    },
  },

  data() {
    return {
      dialogVisible: false,
      columns: [
        {
          title: "预览",
          align: "center",
          width: 147,
          height: 50,
          dataIndex: "action",
          scopedSlots: { customRender: "action" },
        },
        {
          title: "所属人",
          align: "center",
          width: 100,
          dataIndex: "userId",
        },
        {
          title: "签章名称",
          align: "center",
          width: 80,
          dataIndex: "signName",
        },
        {
          title: "签章类型",
          dataIndex: "signType",
          scopedSlots: { customRender: "signType" },
          align: "center",
          width: 147,
        },
        {
          title: "修改时间",
          align: "center",
          width: 180,
          dataIndex: "createTime",
        },
      ],
    };
  },
  watch: {
    dialogVisible: {
      handler(newV) {
        if (newV) this.getUserData();
      },
    },
  },
  computed: {},
  methods: {
    // 用户数据
    async getUserData() {},
    getSign(param) {},
    // 表格选择
    onConfirm() {
      const that = this;
      this.dialogVisible = false;
      this.$emit("onSelect", that.selectUserRows);
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep .el-dialog__body {
  padding: 10px 20px;
}

::v-deep .ant-table-tbody > tr > td {
  padding: 0px !important;
  height: 50px;
}

// ::v-deep .ant-table-tbody > tr > td {

// }
</style>
